﻿#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_pushButton_Cal_clicked()
{
    double total=ui->spinBox_Count->value()*ui->doubleSpinBox_Price->value();
    ui->doubleSpinBox_Total->setValue(total);
}

void MainWindow::on_pushButton_10_clicked()
{
    ui->spinBox_2->setValue(ui->spinBox_10->value());
    ui->spinBox_16->setValue(ui->spinBox_10->value());
}

void MainWindow::on_pushButton_2_clicked()
{
    ui->spinBox_10->setValue(ui->spinBox_2->value());
    ui->spinBox_16->setValue(ui->spinBox_2->value());
}

void MainWindow::on_pushButton_16_clicked()
{
    ui->spinBox_10->setValue(ui->spinBox_16->value());
    ui->spinBox_2->setValue(ui->spinBox_16->value());
}
